VectorImage VariablePolyDelayEnabled
Get or Set the variable poly delay status for this vector image. If the value is set, then the poly delay value will be automatically optimized based on the angular change of the consecutive segments for a polyline. otherwise, the specified value in the vector image will be applied to all.
public bool VariablePolyDelayEnabled {get;Set} |
Return value
bool | variable poly delay status |
Example
Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);
CommandGenerationMode markingMode = scanDeviceManager.markingMode;
if (scanDocument != null)
{
VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);
vectorImage.SetRepeatCount(1);
vectorImage.SetJumpSpeed(1000); // Ignored in Scanpack mode. The LinkRate config variable Scanpack Vector Params regulates the jump speed
vectorImage.SetMarkSpeed(1000); // With this default setting. Feel free to adjust as needed for more/less speed.
vectorImage.SetMarkDelay(400); // Ignored in Scanpack mode
vectorImage.SetJumpDelay(400); // Ignored in Scanpack mode
if (markingMode == CommandGenerationMode.ScanPack)
{
vectorImage.SetMaxRadialError(0.1F); // Affects Scanpack skywriting behavior. Not used in Traditional mode.
vectorImage.SetBreakAngle(45.0F); // Affects Scanpack skywriting behavior. Not used in Traditional mode.
vectorImage.SetLaserOnDelay(0); // Normally set to zero when in Scanpack mode. Use the LaserRiseTime Scanpack config variable instead.
//Use this for fine adjustment.
vectorImage.SetLaserOffDelay(0); // Normally set to zero when in Scanpack mode. Use the LaserFallTime Scanpack config variable instead.
// Use this for fine adjustment.
}
else
{
vectorImage.SetLaserOnDelay(100); // Normally set to zero when in Scanpack mode. Use the LaserRiseTime Scanpack config variable instead.
//Use this for fine adjustment.
vectorImage.SetLaserOffDelay(100); // Normally set to zero when in Scanpack mode. Use the LaserFallTime Scanpack config variable instead.
// Use this for fine adjustment.
}
vectorImage.SetPolyDelay(75); // Ignored in Scanpack mode
vectorImage.VariablePolyDelayEnabled = false; // No angle-based optimization of delay
vectorImage.SetPipelineDelay(0); // For advanced laser timing control. Used to adjust symmetry of bidirectional marking vectors
vectorImage.SetModulationFrequency(100); // LASERMOD1 and LASERMOD2 Frequency in KHz
vectorImage.SetChannelOneDutyCycle(50); // LASERMOD1 duty-cycle
vectorImage.SetChannelTwoDutyCycle(5); // LASERMOD2 duty-cycle
vectorImage.SetLaserPowerPercentage(50); // Sets the actual laser power via the analog or digital port depending on hte LaserConfig file setting
vectorImage.SetVelocityCompensationMode(VelocityCompensationMode.Disabled, 0, 0); // Advanced laser power control at the ends of vectors
vectorImage.VariablePolyDelayEnabled = true;
CircleShape circleShape = new CircleShape();
circleShape.CenterPoint.X = 0.0f;
circleShape.CenterPoint.Y = 0.0f;
circleShape.CenterPoint.Z = 0.0f;
circleShape.Clockwise = true;
circleShape.Radius = 10;
circleShape.StartAngle = 0;
circleShape.MaximumSegmentationError = 0.001f;
vectorImage.AddCircle(circleShape);
scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));
try
{
scanDocument.StartScanning();
}
catch
{
}
}